home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Term / Extras / Source / gtlayout-source.lha / LTP_SearchKeys.c < prev    next >
C/C++ Source or Header  |  1996-03-18  |  933b  |  54 lines

  1. /*
  2. **    GadTools layout toolkit
  3. **
  4. **    Copyright © 1993-1996 by Olaf `Olsen' Barthel
  5. **        Freely distributable.
  6. **
  7. **    :ts=4
  8. */
  9.  
  10. #ifndef _GTLAYOUT_GLOBAL_H
  11. #include "gtlayout_global.h"
  12. #endif
  13.  
  14. #ifdef DO_PICKSHORTCUTS
  15. VOID
  16. LTP_SearchKeys(LayoutHandle *handle,ObjectNode *group)
  17. {
  18.     ObjectNode    *node;
  19.     ULONG         page;
  20.  
  21.     SCANPAGE(group,node,page)
  22.     {
  23.         if(node->Type == GROUP_KIND)
  24.             LTP_SearchKeys(handle,node);
  25.         else
  26.         {
  27.             if(node->Key)
  28.             {
  29.                 LONG i;
  30.  
  31.                 for(i = 0 ; i < 256 ; i++)
  32.                 {
  33.                     if(LTP_Keys[0][i] == node->Key || LTP_Keys[1][i] == node->Key)
  34.                     {
  35.                         handle->Keys[LTP_Keys[0][i]] = TRUE;
  36.                         handle->Keys[LTP_Keys[1][i]] = TRUE;
  37.  
  38.                         break;
  39.                     }
  40.                 }
  41.  
  42.                 if(LTP_Keys[1][node->Key])
  43.                     node->Key = LTP_Keys[0][node->Key];
  44.             }
  45.             else
  46.             {
  47.                 if((handle->CursorKey == node) || (handle->ReturnKey == node) || (handle->EscKey == node) || (handle->TabKey == node))
  48.                     node->NoKey = TRUE;
  49.             }
  50.         }
  51.     }
  52. }
  53. #endif
  54.